﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace UtilZ.Dotnet.Ex.Json
{
    /// <summary>
    /// json元素集合
    /// </summary>
    public class JElementCollection : ReadOnlyCollection<JElement>
    {
        /// <summary>
        /// json集合原始值类型
        /// </summary>
        public JsonOriginValueTypes ElementValueType { get; private set; }



        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="elementValueType">json集合原始值类型</param>
        /// <param name="list">json集合原始值集合</param>
        public JElementCollection(JsonOriginValueTypes elementValueType, List<JElement> list)
            : base(list)
        {
            this.ElementValueType = elementValueType;
        }
    }
}
